Skip to content

gh-114075: Capture test_compileall output #114076

Merged
AlexWaygood merged 3 commits into
python:mainfrom
Eclips4:issue-114075
Jan 15, 2024
Merged

gh-114075: Capture test_compileall output #114076
AlexWaygood merged 3 commits into
python:mainfrom
Eclips4:issue-114075

Conversation

@Eclips4

@Eclips4 Eclips4 commented Jan 15, 2024

Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using test.support.captured_stdout (it's just a convenience wrapper that slightly simplifies what you already have)

@Eclips4

Eclips4 commented Jan 15, 2024

Copy link
Copy Markdown
Member Author

Consider using test.support.captured_stdout (it's just a convenience wrapper that slightly simplifies what you already have)

Thanks!

Also, there is no need in backports, I cannot reproduce it on 3.11 & 3.12 branches.

@Eclips4 Eclips4 changed the title gh-114075: Redirect output to StringIO gh-114075: Capture test output Jan 15, 2024
@AlexWaygood AlexWaygood changed the title gh-114075: Capture test output gh-114075: Capture test_compileall output Jan 15, 2024
Comment thread Lib/test/test_compileall.py Outdated

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output was added in gh-105931 (PR #108671), when this test was also added.

It can be simply silenced by passing quiet=2. But since there is no other test for this output, it is better to capture the stdout, and then test that an expected message occurred in the captured output. Please add this, not simply ignore it.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

@AlexWaygood AlexWaygood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @serhiy-storchaka, I think @Eclips4's latest push addresses your remark

@AlexWaygood AlexWaygood merged commit 892155d into python:main Jan 15, 2024
@Eclips4 Eclips4 deleted the issue-114075 branch January 15, 2024 10:26
@Eclips4

Eclips4 commented Jan 15, 2024

Copy link
Copy Markdown
Member Author

Thanks for your reviews!
🚀

kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants